package com.un.ebs.product.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

/**
 * <p>
 * 
 * </p>
 *
 * @author liubo
 * @since 2019-09-16
 */
@Data
@Component
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_product_class")
public class ProductClass extends Model<ProductClass> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.UUID)
    private String id;

    private String name;

    private String code;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String parentId;

    private Integer sort;

    @TableLogic
    private Boolean isDelete;

    private Boolean isNameInclude;

    private Boolean isInheritAttr;

    private String spuCodeExpression;

    private String tenantId;

    @TableField(fill = FieldFill.INSERT)
    private String createAt;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.UPDATE)
    private String lastModifiedAt;

    @TableField(fill=FieldFill.UPDATE)
    private Date lastModifiedTime;

    @Override
    protected Serializable pkVal() {
            return this.id;
    }

}